package com.dragon.modules.yuegou.query.act;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.act.OffMemberActivityEntity;
import com.dragon.modules.yuegou.enums.act.OffMemberActivityIsPrize;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员参与活动表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-11-20 10:03:07
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class OffMemberActivityQuery extends OffMemberActivityEntity implements Query<OffMemberActivityEntity>{

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员Id查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员头像查询条件 */
	@JsonUnwrapped(prefix = "memberHead")
	private Condition<String> memberHeadCondition;

    /** 会员手机号码查询条件 */
	@JsonUnwrapped(prefix = "memberMobile")
	private Condition<String> memberMobileCondition;

    /** 活动Id查询条件 */
	@JsonUnwrapped(prefix = "activityId")
	private Condition<String> activityIdCondition;

    /** 奖品Id查询条件 */
	@JsonUnwrapped(prefix = "prizeId")
	private Condition<String> prizeIdCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 奖品级别查询条件 */
	@JsonUnwrapped(prefix = "grade")
	private Condition<String> gradeCondition;

    /** 商品Id查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** [枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件 */
	@JsonUnwrapped(prefix = "isPrize")
	private Condition<OffMemberActivityIsPrize> isPrizeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public OffMemberActivityQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public OffMemberActivityQuery(OffMemberActivityEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public OffMemberActivityQuery(OffMemberActivityQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberHeadCondition != null) {
			this.memberHeadCondition = other.memberHeadCondition.copy();
		}
		if(other.memberMobileCondition != null) {
			this.memberMobileCondition = other.memberMobileCondition.copy();
		}
		if(other.activityIdCondition != null) {
			this.activityIdCondition = other.activityIdCondition.copy();
		}
		if(other.prizeIdCondition != null) {
			this.prizeIdCondition = other.prizeIdCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.gradeCondition != null) {
			this.gradeCondition = other.gradeCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.isPrizeCondition != null) {
			this.isPrizeCondition = other.isPrizeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<OffMemberActivityEntity> toQueryWrapper() {
		QueryWrapper<OffMemberActivityEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberHeadCondition != null) {
			memberHeadCondition.toWrapper(wrapper, COL_MEMBER_HEAD);
		}
		if (memberMobileCondition != null) {
			memberMobileCondition.toWrapper(wrapper, COL_MEMBER_MOBILE);
		}
		if (activityIdCondition != null) {
			activityIdCondition.toWrapper(wrapper, COL_ACTIVITY_ID);
		}
		if (prizeIdCondition != null) {
			prizeIdCondition.toWrapper(wrapper, COL_PRIZE_ID);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (gradeCondition != null) {
			gradeCondition.toWrapper(wrapper, COL_GRADE);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (isPrizeCondition != null) {
			isPrizeCondition.toWrapper(wrapper, COL_IS_PRIZE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员Id查询条件
	 * 
	 * @return memberIdCondition 会员Id查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员Id查询条件
	 * 
	 * @return memberIdCondition 会员Id查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员Id查询条件
	 * 
	 * @param memberIdCondition 会员Id查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员头像查询条件
	 * 
	 * @return memberHeadCondition 会员头像查询条件
	 */
	public Condition<String> memberHead() {
		this.memberHeadCondition = new Condition<>();
		return this.memberHeadCondition;
	}
	
	/**
	 * 获取会员头像查询条件
	 * 
	 * @return memberHeadCondition 会员头像查询条件
	 */
	public Condition<String> getMemberHeadCondition() {
		return memberHeadCondition;
	}

	/**
	 * 设置会员头像查询条件
	 * 
	 * @param memberHeadCondition 会员头像查询条件
	 */
	public void setMemberHeadCondition(Condition<String> memberHeadCondition) {
		this.memberHeadCondition = memberHeadCondition;
	}

	/**
	 * 构造并返回会员手机号码查询条件
	 * 
	 * @return memberMobileCondition 会员手机号码查询条件
	 */
	public Condition<String> memberMobile() {
		this.memberMobileCondition = new Condition<>();
		return this.memberMobileCondition;
	}
	
	/**
	 * 获取会员手机号码查询条件
	 * 
	 * @return memberMobileCondition 会员手机号码查询条件
	 */
	public Condition<String> getMemberMobileCondition() {
		return memberMobileCondition;
	}

	/**
	 * 设置会员手机号码查询条件
	 * 
	 * @param memberMobileCondition 会员手机号码查询条件
	 */
	public void setMemberMobileCondition(Condition<String> memberMobileCondition) {
		this.memberMobileCondition = memberMobileCondition;
	}

	/**
	 * 构造并返回活动Id查询条件
	 * 
	 * @return activityIdCondition 活动Id查询条件
	 */
	public Condition<String> activityId() {
		this.activityIdCondition = new Condition<>();
		return this.activityIdCondition;
	}
	
	/**
	 * 获取活动Id查询条件
	 * 
	 * @return activityIdCondition 活动Id查询条件
	 */
	public Condition<String> getActivityIdCondition() {
		return activityIdCondition;
	}

	/**
	 * 设置活动Id查询条件
	 * 
	 * @param activityIdCondition 活动Id查询条件
	 */
	public void setActivityIdCondition(Condition<String> activityIdCondition) {
		this.activityIdCondition = activityIdCondition;
	}

	/**
	 * 构造并返回奖品Id查询条件
	 * 
	 * @return prizeIdCondition 奖品Id查询条件
	 */
	public Condition<String> prizeId() {
		this.prizeIdCondition = new Condition<>();
		return this.prizeIdCondition;
	}
	
	/**
	 * 获取奖品Id查询条件
	 * 
	 * @return prizeIdCondition 奖品Id查询条件
	 */
	public Condition<String> getPrizeIdCondition() {
		return prizeIdCondition;
	}

	/**
	 * 设置奖品Id查询条件
	 * 
	 * @param prizeIdCondition 奖品Id查询条件
	 */
	public void setPrizeIdCondition(Condition<String> prizeIdCondition) {
		this.prizeIdCondition = prizeIdCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回奖品级别查询条件
	 * 
	 * @return gradeCondition 奖品级别查询条件
	 */
	public Condition<String> grade() {
		this.gradeCondition = new Condition<>();
		return this.gradeCondition;
	}
	
	/**
	 * 获取奖品级别查询条件
	 * 
	 * @return gradeCondition 奖品级别查询条件
	 */
	public Condition<String> getGradeCondition() {
		return gradeCondition;
	}

	/**
	 * 设置奖品级别查询条件
	 * 
	 * @param gradeCondition 奖品级别查询条件
	 */
	public void setGradeCondition(Condition<String> gradeCondition) {
		this.gradeCondition = gradeCondition;
	}

	/**
	 * 构造并返回商品Id查询条件
	 * 
	 * @return skuIdCondition 商品Id查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取商品Id查询条件
	 * 
	 * @return skuIdCondition 商品Id查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置商品Id查询条件
	 * 
	 * @param skuIdCondition 商品Id查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回[枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件
	 * 
	 * @return isPrizeCondition [枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件
	 */
	public Condition<OffMemberActivityIsPrize> isPrize() {
		this.isPrizeCondition = new Condition<>();
		return this.isPrizeCondition;
	}
	
	/**
	 * 获取[枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件
	 * 
	 * @return isPrizeCondition [枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件
	 */
	public Condition<OffMemberActivityIsPrize> getIsPrizeCondition() {
		return isPrizeCondition;
	}

	/**
	 * 设置[枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件
	 * 
	 * @param isPrizeCondition [枚举]中奖状态：0-未中奖-NOT_WON、1-已中奖-HAS_WON、2-已领取-RECEIVED查询条件
	 */
	public void setIsPrizeCondition(Condition<OffMemberActivityIsPrize> isPrizeCondition) {
		this.isPrizeCondition = isPrizeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
